Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up legacy styles and remove bs3-compat.scss #4267

Merged
merged 25 commits into from
Feb 28, 2025

Conversation

EreMaijala
Copy link
Contributor

@EreMaijala EreMaijala commented Feb 26, 2025

This is collection of sort-of independent commits with the aim to remove the Bootstrap 3 compatibility layer.

Notable changes:

  • brand- prefix for main colors no longer exists, so e.g. $brand-primary is just $primary.
  • "default" is now added as a color to Bootstrap maps so that btn btn-default continues to work.
  • All select fields that used to have form-control and form-select classes now only have form-select.
  • sr-only is now visually-hidden
  • sr-only-focusable is now visually-hidden-focusable
  • control-label is now form-label
  • pull-right is now float-end (flip no longer needed)
  • pull-left is now float-start (flip no longer needed)
  • Many renamings of variables in Bootstrap 5 have been applied to scss files throughout. Typical type of change is $something-border renamed to $something-border-color.
  • Odd dotted button outline is no longer odd or dotted

Things to check during testing:

  • Cookie consent dialog and preferences
  • Forms and their layout (e.g. advanced search, feedback)
  • Record tags
  • Button colors
  • Colors in general
  • Badge (e.g. counts in facets and "Your Lists")
  • Search box and virtual keyboard button
  • Lightbox close button
  • RTL languages

TODO:

  • Add change log entry when this is merged.
  • Resolve VUFIND-1743 when this is merged.

@EreMaijala
Copy link
Contributor Author

@sturkel89 I hope you could check this set of changes. This is the final big change to eliminate legacy styles (I hope!). Sorry for it being so large, but thought it would be better to keep all these together because many of changes touch same areas in the UI.

Copy link
Contributor

@sturkel89 sturkel89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this PR in both themes and in the mobile emulator, comparing test and dev. (I only tested on Chrome.) I found a number of little quirks that should be pretty easy to fix.


Item record top menu: there's no down arrow in Export Record (both themes)

The down arrow is missing, but the functionality is still there; if you click the button, the three export options appear.

image

UPDATE: This is fixed!


More button in top Suggested Topics area looks weird (both themes)

On dev, the More button is rounded with a faint, clean outline.

On test, the More button is squared off, short, and dark outlining is present whether the button is clicked or not. Both the More and Less buttons in this feature have the same appearance.

image

UPDATE: This is fixed, but looks lighter on test than on dev.


Sidebar facet listings look weird (both themes)

On test, in bootstrap5, there's a gap between the header field and the list of filters, and the More button with the arrow looks weird (similar to the More button in Suggested Topics).

image

In sandal5, the gap is present, but the More button looks okay.

image

UPDATE: This is fixed!


Text Area boxes are three lines high on test but one line high on dev (both themes)

We think that this is an improvement and a reversion to how things used to be! So, this is more of a note than a request to change things.

Example: Comment box on Bootstrap5

image

Example: Create a List on mobile, Sandal5

(NB: there are two other tiny issues with this screen: inconsistent punctuation in the labels for the two boxes, and something is weird with spacing of the breadcrumbs. I'll keep track of those in a different document.)

image

UPDATE: This is fixed!


Record tags: alignment/spacing is different between test and dev

In both themes, there's more horizontal padding inside tag buttons. I don't have a strong opinion on whether this is an improvement or not.

In Sandal5, the padding is the main difference in terms of tag appearance and behavior; wrapping behavior is pretty similar between test and dev.

In Bootstrap5, wrapping behavior is pretty different between test and dev.

Bootstrap5: in test, three short tags need a very wide browser to display all in one row. This is the minimal width for having all three on one line; any narrower, and they wrap to two rows.

image

In dev, this is the width that's needed to display them all in one row:
image

Here's the mobile view of the same three tags in bootstrap5:

image

UPDATE: This is fixed!

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the merge of #4238 has introduced some conflicts. Sorry about that!

@EreMaijala
Copy link
Contributor Author

@demiankatz No problem, that was to be expected!

Now unified with toolbar-btn which was also tweaked a bit with a border and improved contrast.
@EreMaijala
Copy link
Contributor Author

@sturkel89 Thanks for the comments! All should be fixed now. Remarks:

  • The one-line text areas were actually a bug. E.g. on the feedback form the HTML defined eight visible rows, but an invalid css rule overrode that.
  • I dropped the ball with the More/less button. Should be better now, but intentionally not quite the same as before. This is because I took the liberty to unify them with toolbar buttons (record toolbar, bulk actions toolbar, cart lightbox toolbar) which were also tweaked a bit with slightly darker text and a subtle border to improve contrast. I did all this because I think the more/less buttons stood out a bit too much while the toolbar buttons almost blended into the background.

Copy link
Contributor

@sturkel89 sturkel89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that all of my requested changes have been made! Looks great.

In terms of the More/Less buttons in Suggested Topics within your search, I see what you're saying. If the intention is to make these More/Less buttons slightly de-emphasized, you've been successful. As long as it's not an accessibility violation to have such a subtle-looking button, I'm okay with it.

Test:
image

Dev:
image

@EreMaijala
Copy link
Contributor Author

@sturkel89 I verified that the contrast is high enough, and actually the toolbar buttons now have better contrast between text and background than before, because I made the text a notch darker.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks reasonable to me. Thanks, @EreMaijala and @sturkel89!

@demiankatz demiankatz added this to the 11.0 milestone Feb 28, 2025
@demiankatz demiankatz added the architecture pull requests that involve significant refactoring / architectural changes label Feb 28, 2025
@demiankatz
Copy link
Member

Regarding the changelog entry: there is already a link from the changelog to the bootstrap5 wiki page. I added a link from that page to this PR for reference (since there was already a link to the PR removing the JS layer, and this complements that). @EreMaijala, do you think any further documentation work is needed?

@demiankatz demiankatz merged commit 199f4f4 into vufind-org:dev Feb 28, 2025
6 checks passed
@demiankatz demiankatz deleted the dev-bs5-scss-cleanup branch February 28, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture pull requests that involve significant refactoring / architectural changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants